from user import views
from django.urls import path

urlpatterns = [
    path('captcha/', views.CaptchaView.as_view()),
    path('sendcode/', views.SendCode.as_view()),
    path('loginByCode/', views.LoginByCode.as_view()),

    path("loginByPassword/", views.loginByPassword.as_view()),
    path('register/', views.Register.as_view()),
    path('roles/', views.RoleList.as_view()),
    path('retoken/', views.Retoken.as_view()),

    # 新增用户认证API
    path('login/', views.UserLoginAPIView.as_view(), name='user_login'),
    path('profile/', views.UserProfileAPIView.as_view(), name='user_profile'),
    path('actions/', views.UserActionsAPIView.as_view(), name='user_actions'),
    path('actions/sync/', views.UserActionsSyncAPIView.as_view(), name='user_actions_sync'),

    # QQ模拟登录
    path('qq-login/', views.QQLoginView.as_view()),
    path('qq-success/', views.QQSuccessView.as_view()),
    path('qq-auto-login/', views.QQAutoLoginView.as_view()),

    # 实名认证相关路由
    path('real-name-verification/', views.RealNameVerificationView.as_view()),
    path('verification-status/', views.RealNameVerificationStatusView.as_view()),
    path('verification/result/', views.get_verification_result),

    # 图片上传相关路由
    path('upload/id-card/', views.IDCardUploadView.as_view()),
    # 通过上传的图片识别内容
    path('id-card/ocr/', views.id_card_ocr),

    # 新增：人脸对比接口
    path('face-compare/', views.face_compare),

    path('dd_getUrl/', views.DDGetUrl.as_view()),
    path('dd_callback/', views.DDCallback.as_view()),
    path('git_getUrl/', views.GiteeUrl.as_view()),
    path('git_callback/', views.GiteeCallback.as_view()),

    # 七牛云上传文件
    path('qiniuUpload/', views.QiniuUpload.as_view()),
    # 获取用户信息
    path('UserInfo/', views.UserInfoAPIView.as_view()),

    path('jobinfo/', views.JobInfoAPIView.as_view(), name='jobinfo-operations'),
    path('workexperience/', views.WorkExperienceAPIView.as_view(), name='workexperience-operations'),
    path('add-work-experience/', views.AddWorkExperienceAPIView.as_view(), name='add-work-experience'),
    path('upload-avatar/', views.UploadAvatarAPIView.as_view(), name='upload-avatar'),
]
